package com.android.canvasproject.model.listeners;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.widget.Toast;

import com.android.canvasproject.CanvasProjectActivity;
import com.android.canvasproject.model.entity.Canvas;
import com.android.canvasproject.view.utils.ConstantsAction;

public class ProjectModelCanvasListener implements OnClickListener, OnLongClickListener {

	@Override
	public void onClick(View view) {
		view.setActivated(true);

		Intent intent = new Intent(view.getContext(), CanvasProjectActivity.class);
		intent.putExtra(ConstantsAction.IntentsKey.CANVAS_ACTIVITY_INTENT, (Canvas)view.getTag());
		view.getContext().startActivity(intent);

	}

	@Override
	public boolean onLongClick(View v) {
		Toast.makeText(v.getContext(), "[TAPHOLD] Implementar chamada", Toast.LENGTH_LONG).show();
		return true;
	}
}